<script src="../../../router/index.js"></script>
<template>
  <div>
    <base-table-restful :rows.sync="rows" :is-search="isSearch" :api="api" :fields="fields" baseUrl="/code/tableInf" :btns="btns"></base-table-restful>
    <el-dialog center title="表字段维护" :visible.sync="show" append-to-body></el-dialog>
  </div>
</template>

<script>
  import { saveTableInf, getTableInfs, deleteTableInf, updateTableInf } from '../../../api/code'
  import tableInf from './mixins/table-inf'

  export default {
    name: "table-inf",
    mixins: [tableInf],
    props: {
      isSearch: true
    },
    data() {
      return {
        api: {
          save: saveTableInf,
          query: getTableInfs,
          delete: deleteTableInf,
          update: updateTableInf
        },
        btns: [
          {
            title: '表字段维护',
            click: (rows, handle) => {
              this.show = true;
            }
          }
        ],
        show: false
      }
    }
  }
</script>

<style scoped>

</style>
